<html>
<head>
    <title></title>
    <meta charset="utf-8" />
      {%load staticfiles%}
    <link rel="stylesheet"  href="{% static '/bootstrap/css/bootstrap.min.css' %}"  >
    <link rel="stylesheet"  href="{% static '/bootstrap/css/bootstrap-theme.min.css' %}"  >
    <script src="{% static '/bootstrap/js/bootstrap.min.js' %}"></script>
    <script src="{% static '/js/jquery-3.4.1.min.js' %}"></script>
 <style>
        .mycenter
        {
            margin-top: 100px;
            margin-left: auto;
            margin-right: auto;
            height: 350px;
            width: 500px;
            padding: 5%;
            padding-left: 5%;
            padding-right: 5%;
        }
        .mycenter mysign
        {
            width: 440px;
        }
        .mycenter input, checkbox, button
        {
            margin-top: 2%;
            margin-left: 10%;
            margin-right: 10%;
        }
        .mycheckbox
        {
            margin-top: 10px;
            margin-left: 40px;
            margin-bottom: 10px;
            height: 10px;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $('#btn').click(function (e) {
                        $.post('/index/login',{
                            name:$("#username").val(),
                            city:$("#password").val()
                          },
                          function(data,status){
                           data.code
                            alert("Data: " + data + "\nStatus: " + status);
                          }
                          )
            });
        });
    </script>
    <title>用户登录</title>
</head>
<body>
    <form >
    <div class="mycenter">
        <div class="mysign">
            <div class="col-lg-11 text-center text-info">
                <h2>登录</h2>
            </div>
            <div class="col-lg-10">
                <input type="text" class="form-control" id="username" placeholder="请输入账户名" required
                    autofocus />
            </div>
            <div class="col-lg-10">
            </div>
            <div class="col-lg-10">
                <input type="password" class="form-control" id="password" placeholder="请输入密码" required
                    autofocus />
            </div>
            <div class="col-lg-10">
            </div>
            <div class="col-lg-10 mycheckbox checkbox">
                <input type="checkbox" class="col-lg-1">记住密码</input>
            </div>
            <div class="col-lg-10">
            </div>
            <div class="col-lg-10">
                <button type="button" id="btn" class="btn btn-success col-lg-12">
                    登录</button>
            </div>
        </div>
    </div>
    </form>
</body>
</html>